#include <iostream>

using namespace std;
// 100.00 %
class Solution
{
  public:
    int getSum(int a, int b)
    {
        int CF = (a & b) << 1;
        a ^= b;
        while (CF)
        {
            b = CF;
            CF = (a & b) << 1;
            a ^= b;
        }
        return a;
    }
};

int main()
{
    int a = 4, b = 8;
    cout << Solution().getSum(a, b) << endl;
    return 0;
}